Transpose Convolution
Feature Map → Original Size
Essence
Padding the feature map(kernel size & stride size) and maintain the connectivity pattern.
Conditions
- Convolution is Non Zero-Padded:
- $ \left\lfloor \frac{k}{2} \right\rfloor$ is trimmed on each edge.
- Adding $ \left\lfloor \frac{k}{2} \right\rfloor $ back requires the center of the kernel be put $ \left\lfloor \frac{k}{2} \right\rfloor $ away from the edge of the feature map for reconstruction. Note that the corner element of feature map happen to be the corner of the kernel and the connectivity pattern is maintained.
- So $ \left\lfloor \frac{k}{2} \right\rfloor + \left\lfloor \frac{k}{2} \right\rfloor = (k - 1) $ is needed to be padded.
- Convolution is Zero-Padded:
- $ \left\lfloor \frac{k}{2} \right\rfloor - p$ is trimmed on each edge.
- Consider where the center of the kernel should be put for reconstruction. It's $ \left\lfloor \frac{k}{2} \right\rfloor - p $.
- So $ (k - 1) - p $ is needed to be padded.
- Convolution is Half-Padded:
- Full-padding is needed for transpose convolution.
- Convolution is Full-Padded:
- Zero-padding is needed for transpose convolution.
- Convolution is Strided:
- Put zeros between feature map elements.